﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class consolidadoBC
    Public Function cargar_grilla(ByVal mes As String, ByVal año As String, ByVal pper As String) As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla(mes, año, pper)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargar_grilla2() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla2()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargar_grilla_coment(ByVal cod As String) As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla_coment(cod)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargar_grilla_acc(ByVal cod As String) As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla_acc(cod)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargar_grilla_prob(ByVal cod As String) As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla_prob(cod)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function cargar_grilla_prin(ByVal PPER As String, ByVal Periodo As String) As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.cargar_grilla_prin(PPER, Periodo)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function PPER() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.PPER()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function tipo_trans() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.tipo_trans()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipo_trans2() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.tipo_trans2()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipo_PROY() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.tipo_PROY()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipo_ACTV() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.tipo_ACTV()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function tipo_ACC() As DataTable
        Dim objconsolidadoDA As consolidadoDA
        Dim objDt As DataTable

        Try
            objconsolidadoDA = New consolidadoDA
            objDt = objconsolidadoDA.tipo_ACC()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insert_coment(ByVal COmX As String, ByVal descrip As String, ByVal id_pper_mensual As String, ByVal tipo As String)
        Dim objconsolidadoDA As consolidadoDA


        Try
            objconsolidadoDA = New consolidadoDA

            objconsolidadoDA.insert_coment(COmX, descrip, id_pper_mensual, tipo)


        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub update_coment(ByVal COMX As String, ByVal descrip As String)
        Dim objconsolidadoDA As consolidadoDA


        Try
            objconsolidadoDA = New consolidadoDA

            objconsolidadoDA.update_coment(COMX, descrip)


        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub insert_avan_pper(ByVal idppe As String, ByVal period As String, ByVal pper As String, ByVal fech As String, ByVal firm_M As String, ByVal firm_pper As String)
        Dim objconsolidadoDA As consolidadoDA


        Try
            objconsolidadoDA = New consolidadoDA

            objconsolidadoDA.insert_avan_pper(idppe, period, pper, fech, firm_M, firm_pper)


        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Function ListaPPER() As DataTable
        Dim objReporteDA As consolidadoDA
        Dim objDt As DataTable
        Try
            objReporteDA = New consolidadoDA
            objDt = objReporteDA.ListaPPER()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function





    Public Sub EliminarComentario(ByVal IDCM As Integer)
        Dim objconsolidadoDA As consolidadoDA
        Try
            objconsolidadoDA = New consolidadoDA
            objconsolidadoDA.EliminarComentario(IDCM)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function CargarTotalTipo() As DataTable
        Dim objConsilidadoDA As consolidadoDA
        Dim objDt As DataTable
        Try
            objConsilidadoDA = New consolidadoDA
            objDt = objConsilidadoDA.CargarTotalTipo()
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Sub EliminarInforme(ByVal IDCM As String)
        Dim objconsolidadoDA As consolidadoDA
        Try
            objconsolidadoDA = New consolidadoDA
            objconsolidadoDA.EliminarInforme(IDCM)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Function ListarTipoAsignacion_PPER(ByVal v_Ano As String, ByVal v_PPER As String) As DataTable
        Dim objConsilidadoDA As consolidadoDA
        Dim objDt As DataTable
        Try
            objConsilidadoDA = New consolidadoDA
            objDt = objConsilidadoDA.ListarTipoAsignacion_PPER(v_Ano, v_PPER)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
